/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package DTO;

/**
 *
 * @author Endlesslove
 */
public class ThamSo  implements  Idata
{
    public int SoLuongNhapToiThieu;
    public int SoLuongTonToiThieuTruochiNhap;
    public int SoLuongTonToiThieuSaukhiBan;
    public int NoToiDa;
    public boolean ApDungQuyDinhTienThuKhongVuotQuaTienNo;
    public ThamSo(String ...param)
    {
        SoLuongNhapToiThieu = Integer.parseInt(param[0]);
        SoLuongTonToiThieuTruochiNhap = Integer.parseInt(param[1]);
        SoLuongTonToiThieuSaukhiBan = Integer.parseInt(param[2]);
        NoToiDa = Integer.parseInt(param[3]);
        ApDungQuyDinhTienThuKhongVuotQuaTienNo = param[4].contains("true");
    }
    
    @Override
    public boolean Delete() 
    {
        return false;
    }

    @Override
    public boolean Insert() 
    {
        return new BUS.ThamSo().Insert(this);
    }

    @Override
    public boolean Update() 
    {
        return new BUS.ThamSo().Update(this);
    }

    @Override
    public Object[] getObjects() 
    {
        return new Object[]
        {
            SoLuongNhapToiThieu, SoLuongTonToiThieuTruochiNhap, SoLuongTonToiThieuSaukhiBan, NoToiDa, ApDungQuyDinhTienThuKhongVuotQuaTienNo
        };
    }
    @Override
    public String getID() 
    {
        return null;
    }
}
